package com.doudou.collection.orm.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class AnnouncementAddNewDTO implements Serializable {

    /**
     * 公告id
     */
    private Long id;
    /**
     * 公告标题
     */
    @NotNull(message = "请提交公告标题")
    @ApiModelProperty(value = "公告标题", required = true)
    private String title;
    /**
     * 发布人ID
     */
    @NotNull(message = "请提交发布人ID")
    @Range(min = 1, message = "请提交正确的发布人ID值")
    @ApiModelProperty(value = "发布人ID", required = true, example = "1")
    private Long userId;
    /**
     * 公告内容
     */
    @NotNull(message = "请提交公告内容")
    @ApiModelProperty(value = "公告内容", required = true)
    private String content;

    /**
     * 公告优先级
     */
    @NotNull(message = "请提交公告优先级")
    @Range(max = 2, message = "公告优先级0、1、2")
    @ApiModelProperty(value = "公告优先级，2=普通，1=高，0=紧急", required = true, example = "1")
    private Integer priority;


}
